/* 构建路由表「必做：路由懒加载」 */
import Login from '@/views/Login.vue';
import Home from '@/views/Home.vue';
import homeRoutes from './homeRoutes';

const routes = [{
    path: '/',
    redirect: '/home'
}, {
    path: '/home',
    meta: {
        title: '首页',
        level: 1
    },
    component: Home,
    children: homeRoutes
}, {
    path: '/login',
    name: 'login',
    meta: {
        title: '登录',
        level: 1
    },
    component: Login
}, {
    path: '*',
    meta: {
        title: '404',
        level: 1
    },
    component: () => import('@/views/ErrorPage.vue')
}];
export default routes;